' All variables must be declared before using them.
Option Explicit
' Declare a variable that will hold the session number.
Dim gSessionNumber
' Declare constants
Const SP_START_OF_FILE = -1
Const SP_END_OF_FILE = -2
' Declare the sp_OpenSession() function from
' the TegoSND.DLL library.
Declare Function sp_OpenSession Lib "TegoSND.DLL" (ByVal lpstrFileName As String) As Integer
' Declare the sp_PlaySnd() function from
' the TegoSND.DLL library.
Declare Function sp_PlaySnd Lib "TegoSND.DLL" (ByVal iSessionHandler As Integer, ByVal lStartPoint As Long, ByVal lEndPoint As Long) As Long
' Declare the sp_CloseSession() function from
' the TegoSND.DLL library.
Declare Function sp_CloseSession Lib "TegoSND.DLL" (ByVal iSessionHandler As Integer) As Integer
' Declare the sp_MouseON() function from
' the TegoSND.DLL library.
Declare Function sp_MouseON Lib "TegoSND.DLL" (ByVal iSessionHandler As Integer) As Integer
' Declare the sp_MouseOFF() function from
' the TegoSND.DLL library.
Declare Function sp_MouseOFF Lib "TegoSND.DLL" (ByVal iSessionHandler As Integer) As Integer
Sub cmdDisplay_Click ()
If cmdDisplay.Caption = "&Display Speech" Then
lblSpeech.Caption = "So my fellow Americans" + Chr(13) + "ask not" + Chr(13) + "what your country can do for you" + Chr(13) + "ask what you can do for your country"